package com.community.contents.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.community.contents.entity.TopicUserEntity;

/**
 * <p>
 * 用户关注的圈子表 服务类
 * </p>
 *
 * @author hjs
 * @since 2023-02-28
 */
public interface ITopicUserService extends IService<TopicUserEntity> {

    /**
     * 判断登录用户是否加入了圈子
     * @param topicId 圈子id
     * @param userId  用户id
     * @return boolean
     */
    public boolean isJoin(Integer topicId,Integer userId);

    /**
     * 用户加入圈子
     * @param topicId 圈子id
     * @param userId 用户id
     * @return
     */
    boolean joinTopic(int topicId, Integer userId);
}
